package com.jy.oms.framework.asyn.task.core;

import com.jy.oms.framework.id.IdCreateService;
import org.redisson.api.RedissonClient;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;

/**
 * @author liuquan
 */
@Service
public class TaskIdCreateService extends IdCreateService {

    public TaskIdCreateService(RedissonClient redissonClient) {
        super(redissonClient);
    }

    @Override
    public void initService(ApplicationContext applicationContext) {
        if(ExecutorContext.getExecutorConfig() == null){
            return;
        }
        this.redissonClient = RedissonClientProxy.getRedissonClient();

        super.initService(applicationContext);
    }
}
